package com.yixing.tech.system.po;

import com.yixing.tech.common.base.BasePO;
import com.yixing.tech.common.base.ConditionsVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.List;
import java.util.Map;

/**
 * @author yixing tech
 * at 2021/12/31
 * describe：
 */
@Data
@Accessors(chain=true)
@NoArgsConstructor
@AllArgsConstructor
public class Role extends BasePO {
    String name;
    String desc;
    /**
     * 菜单权限
     */
    List<String> menuIds;
    /**
     * 隐藏菜单
     */
    List<String> hideMenuIds;
    Map<String,List<String>> actions;
    List<String> webPageIds;
    /**
     * 应用权限
     */
    List<String> applicationIds;

    /**
     * 流程权限
     */
    List<String> processIds;
    /**
     * 数据权限
     */
    Map<String,DataConfig> dataConfigs;

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class DataConfig{

        /**
         * 禁读属性
         */
        List<String> notReadAttr;
        /**
         * 禁写属性
         */
        List<String> notWriteAttr;

        /**
         * 过滤权限
         */
        List<ConditionsVO.Condition> conditions;

    }




}
